from django.db import models


class MemberGoodsLogs(models.Model):
    member_id = models.IntegerField(null=False)
    goods_sn = models.CharField(max_length=36)
    subject_type = models.PositiveIntegerField()
    subject_sn = models.CharField(max_length=32)
    trade_type = models.PositiveIntegerField(null=False)
    amount = models.PositiveIntegerField(null=False)
    amount_prev = models.PositiveIntegerField(null=False)
    amount_next = models.PositiveIntegerField(null=False)
    batch_mark = models.CharField(max_length=8)
    created = models.PositiveIntegerField(null=False)

    class Meta:
        managed = False
        db_table = 'member_goods_logs'
